#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main()
{
    int n = 0;
    scanf("%d", &n);
    int a = 0;
    while (n != 1)
    {
        if (1 != n % 2)
        {
            n = n / 2;
            a = a + 1;
        }
        else
        {
            n = 3 * n + 1;
            n = n / 2;
            a = a + 1;
        }
    }
    printf("%d", a);
    
    return 0;
}